package utils

import (
	"fmt"
	_ "github.com/go-sql-driver/mysql"
	"github.com/jmoiron/sqlx"
)

var (
	DbConn *sqlx.DB
	err error
)

//初始化直接调用
func init()  {
	DbConn, err = sqlx.Open(GetDbDriver(), GetDbUrl())
	if err != nil {
		fmt.Println("open mysql connection faild", err)
		return
	}
}